/******************************************************************************
 * Product: Adempiere ERP & CRM Smart Business Solution                       *
 * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved.                *
 * This program is free software, you can redistribute it and/or modify it    *
 * under the terms version 2 of the GNU General Public License as published   *
 * by the Free Software Foundation. This program is distributed in the hope   *
 * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.           *
 * See the GNU General Public License for more details.                       *
 * You should have received a copy of the GNU General Public License along    *
 * with this program, if not, write to the Free Software Foundation, Inc.,    *
 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.                     *
 * For the text or an alternative of this public license, you may reach us    *
 * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA        *
 * or via info@compiere.org or http://www.compiere.org/license.html           *
 *****************************************************************************/
/** Generated Model - DO NOT CHANGE */
package org.compiere.model;

import java.math.BigDecimal;
import java.sql.ResultSet;
import java.sql.Timestamp;
import java.util.Properties;
import org.compiere.util.Env;
import org.compiere.util.KeyNamePair;

/** Generated Model for cms_pattern
 *  @author Adempiere (generated) 
 *  @version Release 3.7.0LTS - $Id$ */
public class X_cms_pattern extends PO implements I_cms_pattern, I_Persistent 
{

	/**
	 *
	 */
	private static final long serialVersionUID = 20121212L;

    /** the default Constructor */
    public X_cms_pattern(Properties ctx)
    { 
      super (ctx, null, null);
    } 

    /** Standard Constructor */
    public X_cms_pattern (Properties ctx, int cms_pattern_ID, String trxName)
    {
      super (ctx, cms_pattern_ID, trxName);
      /** if (cms_pattern_ID == 0)
        {
			setCMS_Contract_ID (0);
			setcms_pattern_ID (0);
			setCustomer (null);
			setZerdeBP (0);
        } */
    }

    /** Load Constructor */
    public X_cms_pattern (Properties ctx, ResultSet rs, String trxName)
    {
      super (ctx, rs, trxName);
    }

    /** AccessLevel
      * @return 3 - Client - Org 
      */
    protected int get_AccessLevel()
    {
      return accessLevel.intValue();
    }

    /** Load Meta Data */
    protected POInfo initPO (Properties ctx)
    {
      POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
      return poi;
    }

    public String toString()
    {
      StringBuffer sb = new StringBuffer ("X_cms_pattern[")
        .append(get_ID()).append("]");
      return sb.toString();
    }

	/** Set amountwithouttax.
		@param amountwithouttax 
		amountwithouttax
	  */
	public void setamountwithouttax (BigDecimal amountwithouttax)
	{
		set_Value (COLUMNNAME_amountwithouttax, amountwithouttax);
	}

	/** Get amountwithouttax.
		@return amountwithouttax
	  */
	public BigDecimal getamountwithouttax () 
	{
		BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_amountwithouttax);
		if (bd == null)
			 return Env.ZERO;
		return bd;
	}

	/** Set basis.
		@param basis 
		Основание
	  */
	public void setbasis (String basis)
	{
		set_Value (COLUMNNAME_basis, basis);
	}

	/** Get basis.
		@return Основание
	  */
	public String getbasis () 
	{
		return (String)get_Value(COLUMNNAME_basis);
	}

	/** Set basis2.
		@param basis2 basis2	  */
	public void setbasis2 (String basis2)
	{
		set_Value (COLUMNNAME_basis2, basis2);
	}

	/** Get basis2.
		@return basis2	  */
	public String getbasis2 () 
	{
		return (String)get_Value(COLUMNNAME_basis2);
	}

	/** Set basis2kaz.
		@param basis2kaz basis2kaz	  */
	public void setbasis2kaz (String basis2kaz)
	{
		set_Value (COLUMNNAME_basis2kaz, basis2kaz);
	}

	/** Get basis2kaz.
		@return basis2kaz	  */
	public String getbasis2kaz () 
	{
		return (String)get_Value(COLUMNNAME_basis2kaz);
	}

	/** Set basiskaz.
		@param basiskaz basiskaz	  */
	public void setbasiskaz (String basiskaz)
	{
		set_Value (COLUMNNAME_basiskaz, basiskaz);
	}

	/** Get basiskaz.
		@return basiskaz	  */
	public String getbasiskaz () 
	{
		return (String)get_Value(COLUMNNAME_basiskaz);
	}

	public org.compiere.model.I_C_BPartner getC_BPartner() throws RuntimeException
    {
		return (org.compiere.model.I_C_BPartner)MTable.get(getCtx(), org.compiere.model.I_C_BPartner.Table_Name)
			.getPO(getC_BPartner_ID(), get_TrxName());	}

	/** Set Business Partner .
		@param C_BPartner_ID 
		Identifies a Business Partner
	  */
	public void setC_BPartner_ID (int C_BPartner_ID)
	{
		if (C_BPartner_ID < 1) 
			set_Value (COLUMNNAME_C_BPartner_ID, null);
		else 
			set_Value (COLUMNNAME_C_BPartner_ID, Integer.valueOf(C_BPartner_ID));
	}

	/** Get Business Partner .
		@return Identifies a Business Partner
	  */
	public int getC_BPartner_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_C_BPartner_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set C_BPartnerKaz.
		@param C_BPartnerKaz C_BPartnerKaz	  */
	public void setC_BPartnerKaz (String C_BPartnerKaz)
	{
		set_Value (COLUMNNAME_C_BPartnerKaz, C_BPartnerKaz);
	}

	/** Get C_BPartnerKaz.
		@return C_BPartnerKaz	  */
	public String getC_BPartnerKaz () 
	{
		return (String)get_Value(COLUMNNAME_C_BPartnerKaz);
	}

	public I_CMS_Contract getCMS_Contract() throws RuntimeException
    {
		return (I_CMS_Contract)MTable.get(getCtx(), I_CMS_Contract.Table_Name)
			.getPO(getCMS_Contract_ID(), get_TrxName());	}

	/** Set Contract.
		@param CMS_Contract_ID 
		Номер контракта (CMS)
	  */
	public void setCMS_Contract_ID (int CMS_Contract_ID)
	{
		if (CMS_Contract_ID < 1) 
			set_ValueNoCheck (COLUMNNAME_CMS_Contract_ID, null);
		else 
			set_ValueNoCheck (COLUMNNAME_CMS_Contract_ID, Integer.valueOf(CMS_Contract_ID));
	}

	/** Get Contract.
		@return Номер контракта (CMS)
	  */
	public int getCMS_Contract_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_CMS_Contract_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set cms_pattern.
		@param cms_pattern_ID cms_pattern	  */
	public void setcms_pattern_ID (int cms_pattern_ID)
	{
		if (cms_pattern_ID < 1) 
			set_ValueNoCheck (COLUMNNAME_cms_pattern_ID, null);
		else 
			set_ValueNoCheck (COLUMNNAME_cms_pattern_ID, Integer.valueOf(cms_pattern_ID));
	}

	/** Get cms_pattern.
		@return cms_pattern	  */
	public int getcms_pattern_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_cms_pattern_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set Customer.
		@param Customer Customer	  */
	public void setCustomer (String Customer)
	{
		set_Value (COLUMNNAME_Customer, Customer);
	}

	/** Get Customer.
		@return Customer	  */
	public String getCustomer () 
	{
		return (String)get_Value(COLUMNNAME_Customer);
	}

    /** Get Record ID/ColumnName
        @return ID/ColumnName pair
      */
    public KeyNamePair getKeyNamePair() 
    {
        return new KeyNamePair(get_ID(), getCustomer());
    }

	/** Set Customerkaz.
		@param Customerkaz Customerkaz	  */
	public void setCustomerkaz (String Customerkaz)
	{
		set_Value (COLUMNNAME_Customerkaz, Customerkaz);
	}

	/** Get Customerkaz.
		@return Customerkaz	  */
	public String getCustomerkaz () 
	{
		return (String)get_Value(COLUMNNAME_Customerkaz);
	}

	/** Set Date From.
		@param DateFrom 
		Starting date for a range
	  */
	public void setDateFrom (Timestamp DateFrom)
	{
		set_Value (COLUMNNAME_DateFrom, DateFrom);
	}

	/** Get Date From.
		@return Starting date for a range
	  */
	public Timestamp getDateFrom () 
	{
		return (Timestamp)get_Value(COLUMNNAME_DateFrom);
	}

	/** Set DateFromkaz.
		@param DateFromkaz 
		Starting date for a range
	  */
	public void setDateFromkaz (Timestamp DateFromkaz)
	{
		set_Value (COLUMNNAME_DateFromkaz, DateFromkaz);
	}

	/** Get DateFromkaz.
		@return Starting date for a range
	  */
	public Timestamp getDateFromkaz () 
	{
		return (Timestamp)get_Value(COLUMNNAME_DateFromkaz);
	}

	/** Set DeliveryPattern.
		@param DeliveryPattern DeliveryPattern	  */
	public void setDeliveryPattern (String DeliveryPattern)
	{
		set_Value (COLUMNNAME_DeliveryPattern, DeliveryPattern);
	}

	/** Get DeliveryPattern.
		@return DeliveryPattern	  */
	public String getDeliveryPattern () 
	{
		return (String)get_Value(COLUMNNAME_DeliveryPattern);
	}

	/** Set DeliveryPatternkaz.
		@param DeliveryPatternkaz DeliveryPatternkaz	  */
	public void setDeliveryPatternkaz (String DeliveryPatternkaz)
	{
		set_Value (COLUMNNAME_DeliveryPatternkaz, DeliveryPatternkaz);
	}

	/** Get DeliveryPatternkaz.
		@return DeliveryPatternkaz	  */
	public String getDeliveryPatternkaz () 
	{
		return (String)get_Value(COLUMNNAME_DeliveryPatternkaz);
	}

	/** Set Description.
		@param Description 
		Optional short description of the record
	  */
	public void setDescription (String Description)
	{
		set_Value (COLUMNNAME_Description, Description);
	}

	/** Get Description.
		@return Optional short description of the record
	  */
	public String getDescription () 
	{
		return (String)get_Value(COLUMNNAME_Description);
	}

	/** Set Director.
		@param Director Director	  */
	public void setDirector (String Director)
	{
		set_Value (COLUMNNAME_Director, Director);
	}

	/** Get Director.
		@return Director	  */
	public String getDirector () 
	{
		return (String)get_Value(COLUMNNAME_Director);
	}

	/** Set Directorkaz.
		@param Directorkaz Directorkaz	  */
	public void setDirectorkaz (String Directorkaz)
	{
		set_Value (COLUMNNAME_Directorkaz, Directorkaz);
	}

	/** Get Directorkaz.
		@return Directorkaz	  */
	public String getDirectorkaz () 
	{
		return (String)get_Value(COLUMNNAME_Directorkaz);
	}

	/** Set No.
		@param No No	  */
	public void setNo (String No)
	{
		set_Value (COLUMNNAME_No, No);
	}

	/** Get No.
		@return No	  */
	public String getNo () 
	{
		return (String)get_Value(COLUMNNAME_No);
	}

	/** Set Nokaz.
		@param Nokaz Nokaz	  */
	public void setNokaz (String Nokaz)
	{
		set_Value (COLUMNNAME_Nokaz, Nokaz);
	}

	/** Get Nokaz.
		@return Nokaz	  */
	public String getNokaz () 
	{
		return (String)get_Value(COLUMNNAME_Nokaz);
	}

	/** Set Processed.
		@param Processed 
		The document has been processed
	  */
	public void setProcessed (boolean Processed)
	{
		set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed));
	}

	/** Get Processed.
		@return The document has been processed
	  */
	public boolean isProcessed () 
	{
		Object oo = get_Value(COLUMNNAME_Processed);
		if (oo != null) 
		{
			 if (oo instanceof Boolean) 
				 return ((Boolean)oo).booleanValue(); 
			return "Y".equals(oo);
		}
		return false;
	}

	/** Set Process Now.
		@param Processing Process Now	  */
	public void setProcessing (boolean Processing)
	{
		set_Value (COLUMNNAME_Processing, Boolean.valueOf(Processing));
	}

	/** Get Process Now.
		@return Process Now	  */
	public boolean isProcessing () 
	{
		Object oo = get_Value(COLUMNNAME_Processing);
		if (oo != null) 
		{
			 if (oo instanceof Boolean) 
				 return ((Boolean)oo).booleanValue(); 
			return "Y".equals(oo);
		}
		return false;
	}

	/** Set ProducerName.
		@param ProducerName ProducerName	  */
	public void setProducerName (String ProducerName)
	{
		set_Value (COLUMNNAME_ProducerName, ProducerName);
	}

	/** Get ProducerName.
		@return ProducerName	  */
	public String getProducerName () 
	{
		return (String)get_Value(COLUMNNAME_ProducerName);
	}

	/** Set ProducerNamekaz.
		@param ProducerNamekaz ProducerNamekaz	  */
	public void setProducerNamekaz (String ProducerNamekaz)
	{
		set_Value (COLUMNNAME_ProducerNamekaz, ProducerNamekaz);
	}

	/** Get ProducerNamekaz.
		@return ProducerNamekaz	  */
	public String getProducerNamekaz () 
	{
		return (String)get_Value(COLUMNNAME_ProducerNamekaz);
	}

	/** Set ResponsibleFace.
		@param ResponsibleFace ResponsibleFace	  */
	public void setResponsibleFace (String ResponsibleFace)
	{
		set_Value (COLUMNNAME_ResponsibleFace, ResponsibleFace);
	}

	/** Get ResponsibleFace.
		@return ResponsibleFace	  */
	public String getResponsibleFace () 
	{
		return (String)get_Value(COLUMNNAME_ResponsibleFace);
	}

	/** Set ResponsibleFacekaz.
		@param ResponsibleFacekaz ResponsibleFacekaz	  */
	public void setResponsibleFacekaz (String ResponsibleFacekaz)
	{
		set_Value (COLUMNNAME_ResponsibleFacekaz, ResponsibleFacekaz);
	}

	/** Get ResponsibleFacekaz.
		@return ResponsibleFacekaz	  */
	public String getResponsibleFacekaz () 
	{
		return (String)get_Value(COLUMNNAME_ResponsibleFacekaz);
	}

	/** Set Summary.
		@param Summary 
		Textual summary of this request
	  */
	public void setSummary (BigDecimal Summary)
	{
		set_Value (COLUMNNAME_Summary, Summary);
	}

	/** Get Summary.
		@return Textual summary of this request
	  */
	public BigDecimal getSummary () 
	{
		BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Summary);
		if (bd == null)
			 return Env.ZERO;
		return bd;
	}

	public org.compiere.model.I_C_BPartner getZerd() throws RuntimeException
    {
		return (org.compiere.model.I_C_BPartner)MTable.get(getCtx(), org.compiere.model.I_C_BPartner.Table_Name)
			.getPO(getZerdeBP(), get_TrxName());	}

	/** Set ZerdeBP.
		@param ZerdeBP ZerdeBP	  */
	public void setZerdeBP (int ZerdeBP)
	{
		set_Value (COLUMNNAME_ZerdeBP, Integer.valueOf(ZerdeBP));
	}

	/** Get ZerdeBP.
		@return ZerdeBP	  */
	public int getZerdeBP () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_ZerdeBP);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}
}